<?php
session_start(); 
if (!isset($_SESSION['uid']) || !$_SESSION['uid']) {
	header('Location: /login.html?errmsg=尚未登录');
	die();
}
$uid = $_SESSION['uid'];
require_once('globaldb.php');
if ($db->getStatus()) {

	$sql = 'select aid,create_time,title from article where uid='.$uid;
	$articles = $db->dbQuery($sql);
	include_once('views/dashboard.phtml');
} else {
	echo 'db connection error';
}